<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<div class="box m">
	<div class="btitle path">
		<a href="goHomePage.html"><spring:message code="top.header.homepage" /></a>&nbsp;»&nbsp; <a><spring:message code="page.header.viewcart" /></a>
	</div>
	<div class="bCt productLs">
		<div class="m3" style="padding-left: 0px;">
			<div class="clearfix">
				<div class="roundBoxBody">
					<div class="text-main">
						<br>
						<table class="cart" cellpadding="5" cellspacing="1">
							<tbody>
								<tr>
									<th width="35"><spring:message code="cart.item" /></th>
									<th width="200"><spring:message code="cart.product.name" /></th>
									<th width="60"><spring:message code="cart.product.image" /></th>
									<th width="70"><spring:message code="cart.product.quantity" /></th>
									<th width="130"><spring:message code="cart.product.unit.price" /></th>
									<th width="130"><spring:message code="cart.product.total.price" /></th>
								</tr>
								<c:forEach var="p" items="${saleOrder.products}" varStatus="i">
									<tr>
										<td align="center"><c:out value="${i.index}" /></td>
										<td style="padding-left: 5px;"><c:out value='${p.name}' /></td>
										<td align="center"><img style="max-height: 50px;" src="loadImage.html?type=THUMB&fileId=${p.productImages[0]}" width="50"></td>
										<td class="tal">${p.quantity }</td>
										<td class="tal"><font color="red">${p.getUnitPriceAsSale()}</font></td>
										<td class="tal"><font color="red">${p.getTotalPriceAsSale()}</font></td>
									</tr>
								</c:forEach>
								<tr>
									<td colspan="5" style='padding: 5px; color: #333;' align="right" height="30px"><b><spring:message code="cart.total.payment" /><font
											color="red">${saleOrder.getTotalPriceAsSale()}</font></b></td>
								</tr>
							</tbody>
						</table>
						<br>

						<div style="clear: both; background: #ffe4dd; padding: 5px; color: #b52427; text-align: left;">
							<strong><spring:message code="cart.checkout.patron.info" /></strong>
						</div>

						<table class="tbl bgLLGray bdLGray wf mt10 pb20 guimail">
							<tbody>
								<tr>
									<th class="w160 vam"><spring:message code="cart.total.txn.no" /></th>
									<td><c:out value='${saleOrder.transactionRefNum }' /></td>
								</tr>
								<tr>
									<th class="w160 vam"><spring:message code="cart.checkout.patron.name" /></th>
									<td><c:out value='${saleOrder.patronInfo.fullName }' /></td>
								</tr>
								<tr>
									<th><spring:message code="cart.checkout.patron.email" /></th>
									<td><c:out value='${saleOrder.patronInfo.email }' /></td>
								</tr>
								<tr>
									<th><spring:message code="cart.checkout.patron.phone" /></th>
									<td><c:out value='${saleOrder.patronInfo.phone }' /></td>
								</tr>
								<tr>
									<th><spring:message code="cart.checkout.patron.address" /></th>
									<td><c:out value='${saleOrder.patronInfo.address }' /></td>
								</tr>
								<tr>
									<th><spring:message code="cart.checkout.patron.remark" /></th>
									<td><c:out value='${saleOrder.patronInfo.remark }' /></td>
								</tr>
								<tr>
									<th><spring:message code="cart.checkout.patron.payment.method" /></th>
									<td><c:out value='${saleOrder.paymentMethodName}' /></td>
								</tr>
							</tbody>
						</table>
						<div class="pt20 tar" style="padding-bottom: 15px; padding-top: 0px !important; padding-left: 230px;" align="left">
							<a href="goProducts.html" onclick=""><input value="<spring:message code="cart.continue" />" type="button"></a>
						</div>
					</div>
				</div>
			</div>
			<div class="clearfix"></div>
		</div>
	</div>
</div>
